package com.aspose.cells;

class zy extends zck {
   zy(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
      switch(this.e.b) {
      case 1:
      default:
         break;
      case 2:
         com.aspose.cells.b.a.b.a.zi var5 = new com.aspose.cells.b.a.b.a.zi(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, this.e.S().i());
         this.a.b(var5);
         break;
      case 3:
         com.aspose.cells.b.a.b.a.zi var6 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, -1.0F, this.e.S().h(), this.e.S().i());
         this.a.b(var6);
         break;
      case 4:
         com.aspose.cells.b.a.b.a.zi var7 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, 1.0F, this.e.S().h(), 0.0F);
         this.a.b(var7);
      }

   }

   void b() {
      com.aspose.cells.b.a.b.a.ze var1 = new com.aspose.cells.b.a.b.a.ze();
      float var2 = this.e.s();
      float var3 = this.e.t();
      float var4 = this.e.q();
      float var5 = this.e.r();
      float var6 = 0.0F;
      float var7 = 0.0F;
      float var8 = 0.0F;
      float var9 = 0.0F;
      float var10 = 0.0F;
      float var11 = 0.0F;
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var6 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(5)) / 100000.0F * this.e.q();
            var7 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(4)) / 100000.0F * this.e.r();
            var8 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F * this.e.q();
            var9 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F * this.e.r();
            var10 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(3)) / 100000.0F * this.e.q();
            var11 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(2)) / 100000.0F * this.e.r();
         } else {
            var6 = -0.46667F * this.e.q();
            var7 = 1.125F * this.e.r();
            var8 = -0.08333F * this.e.q();
            var9 = 0.1875F * this.e.r();
            var10 = -0.16667F * this.e.q();
            var11 = 0.1875F * this.e.r();
         }
      } else {
         var6 = -0.46667F * this.e.q();
         var7 = 1.125F * this.e.r();
         var8 = -0.08333F * this.e.q();
         var9 = 0.1875F * this.e.r();
         var10 = -0.16667F * this.e.q();
         var11 = 0.1875F * this.e.r();
      }

      float var12 = var10 > (var6 > var8 ? var8 : var6) ? (var6 > var8 ? var8 : var6) : var10;
      float var13 = var10 < (var6 < var8 ? var8 : var6) ? (var6 < var8 ? var8 : var6) : var10;
      float var14 = var11 > (var7 > var9 ? var9 : var7) ? (var7 > var9 ? var9 : var7) : var11;
      float var15 = var11 < (var7 < var9 ? var9 : var7) ? (var7 < var9 ? var9 : var7) : var11;
      float var16 = 0.0F;
      float var17 = 0.0F;
      float var18 = 0.0F;
      float var19 = 0.0F;
      if (var12 < 0.0F) {
         var16 = -var12;
      }

      if (var14 < 0.0F) {
         var18 = -var14;
      }

      if (var13 > var4) {
         var17 = var13 - var4;
      }

      if (var15 > var5) {
         var19 = var15 - var5;
      }

      if (this.e.R()) {
         var6 = -var6 + var4;
         var8 = -var8 + var4;
         var10 = -var10 + var4;
         var16 = var17;
      }

      if (this.e.Q()) {
         var7 = -var7 + var5;
         var9 = -var9 + var5;
         var11 = -var11 + var5;
         var18 = var19;
      }

      com.aspose.cells.b.a.b.zq var20 = new com.aspose.cells.b.a.b.zq(var2 + var16, var3 + var18, var4, var5);
      com.aspose.cells.b.a.b.a.ze var21 = new com.aspose.cells.b.a.b.a.ze();
      var21.b(var20);
      com.aspose.cells.b.a.b.zc var22 = zbum.a(this.e.w(), var21);
      com.aspose.cells.b.a.b.zm var23 = zbum.a(this.e.x());
      if (!this.e.w().a()) {
         var1.b(var20);
         this.a.a(var22, var1);
      }

      this.a.b(var23, var2 + var6 + var16, var3 + var7 + var18, var2 + var10 + var16, var3 + var11 + var18);
      this.a.b(var23, var2 + var10 + var16, var3 + var11 + var18, var2 + var8 + var16, var3 + var9 + var18);
      this.a.b(var23, var2 + var8 + var16, var3 + var2 + var18, var2 + var8 + var16, var3 + var5 + var18);
      this.a();
   }

   void a() {
      float var1 = this.e.s();
      float var2 = this.e.t();
      float var3 = this.e.q();
      float var4 = this.e.r();
      float var5 = 0.0F;
      float var6 = 0.0F;
      float var7 = 0.0F;
      float var8 = 0.0F;
      float var9 = 0.0F;
      float var10 = 0.0F;
      if (this.e.m != null) {
         var5 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(5)) / 100000.0F * this.e.q();
         var6 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(4)) / 100000.0F * this.e.r();
         var7 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F * this.e.q();
         var8 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F * this.e.r();
         var9 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(3)) / 100000.0F * this.e.q();
         var10 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(2)) / 100000.0F * this.e.r();
      } else {
         var5 = -0.46667F * this.e.q();
         var6 = 1.125F * this.e.r();
         var7 = -0.08333F * this.e.q();
         var8 = 0.1875F * this.e.r();
         var9 = -0.16667F * this.e.q();
         var10 = 0.1875F * this.e.r();
      }

      float var11 = var9 > (var5 > var7 ? var7 : var5) ? (var5 > var7 ? var7 : var5) : var9;
      float var12 = var9 < (var5 < var7 ? var7 : var5) ? (var5 < var7 ? var7 : var5) : var9;
      float var13 = var10 > (var6 > var8 ? var8 : var6) ? (var6 > var8 ? var8 : var6) : var10;
      float var14 = var10 < (var6 < var8 ? var8 : var6) ? (var6 < var8 ? var8 : var6) : var10;
      float var15 = 0.0F;
      float var16 = 0.0F;
      float var17 = 0.0F;
      float var18 = 0.0F;
      if (var11 < 0.0F) {
         var15 = -var11;
      }

      if (var13 < 0.0F) {
         var17 = -var13;
      }

      if (var12 > var3) {
         var16 = var12 - var3;
      }

      if (var14 > var4) {
         var18 = var14 - var4;
      }

      if (this.e.R()) {
         var5 = -var5 + var3;
         var7 = -var7 + var3;
         var9 = -var9 + var3;
         var15 = var16;
      }

      if (this.e.Q()) {
         var6 = -var6 + var4;
         var8 = -var8 + var4;
         var10 = -var10 + var4;
         var17 = var18;
      }

      com.aspose.cells.b.a.b.zq var19 = new com.aspose.cells.b.a.b.zq(var1 + var15, var2 + var17, var3, var4);
      if (!this.e.x().a()) {
         var19.a(-(this.e.x().f() / 2.0F), -(this.e.x().f() / 2.0F));
      }

      float var20 = zbum.a(this.e.y());
      if (this.e.A() != 7 && this.e.A() != 9) {
         if (this.e.A() == 0 || this.e.A() == 8) {
            var19.c(var19.h() - var20);
         }
      } else {
         var19.a(var19.f() + var20);
      }

      if (!this.e.G().equals("\n")) {
         zbum.a(this.a, this.e, var19, this.e.G(), this.e.D(), this.e.y(), this.e.z(), this.e.A(), this.e.B(), this.e.C());
      }
   }
}
